﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TimeoutApprovals.aspx.cs" Inherits="CentralOffice.WebClient.Tasks.TimeoutApprovals" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>审批超时查询</title>
    <link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
    <script src="../inc/js/ccorrect_btn.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
<table class="TableBlock" width="100%" align="center">
   <tr>
       <td nowrap class="TableData">申请名称：</td><td nowrap class="TableData"><asp:TextBox ID="txtName" runat="server" CssClass="BigInput"></asp:TextBox></td>
       <td nowrap class="TableData">申请类别：</td><td nowrap class="TableData"><asp:DropDownList ID="ddlCategory" runat="server"></asp:DropDownList></td>
       <td nowrap class="TableData">申请日期从：</td><td nowrap class="TableData"><asp:TextBox ID="txtDateOfApplication" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$('txtIntendingDate')})" src="../../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
   </tr>
   <tr>
       <td nowrap class="TableData">申请人：</td><td nowrap class="TableData"><asp:TextBox ID="txtApplicant" runat="server" CssClass="BigInput"></asp:TextBox><%--<input type="text" id="txtAccepterReadOnly" name="txtDepartmentReadOnly" class="BigInput"  value="" /><asp:HiddenField ID="txtAccepter" runat="server" />&nbsp;<asp:LinkButton ID="btnAddDepartment" runat="server" CssClass="orgAdd">添加</asp:LinkButton><a href="javascript:;" class="orgClear" onclick="$get('txtDepartmentReadOnly').value='';">清空</a>--%></td>
       <td nowrap class="TableData">是超时审批</td><td nowrap class="TableData"><asp:CheckBox ID="chkIsTimeout" runat="server" Checked="true" /></td>
       <td nowrap class="TableData">到：</td><td nowrap class="TableData"><asp:TextBox ID="txtDateOfApplicationEnd" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$('txtDateOfApplicationEnd')})" src="../../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
   </tr>
   <tr>
       <td nowrap class="TableData">审批人：</td><td nowrap class="TableData"><asp:TextBox ID="txtApprovedBy" runat="server" CssClass="BigInput"></asp:TextBox></td>
       <td nowrap class="TableData"></td><td nowrap class="TableData"></td>
       <td nowrap class="TableData"></td><td nowrap class="TableData"></td>
   </tr>
   <tr>
   <td nowrap class="TableControl" colspan="6" align="center"><asp:Button ID="btnQuery" runat="server" Text="查询"  CssClass="BigButton" OnClick="btnQuery_Click" /></td>
   </tr>
</table>

<div style="margin-top:20px; margin-left:8px;"><h3>查询结果：</h3></div>

<div style="text-align:center">

<asp:UpdatePanel UpdateMode="Conditional" ID="upCompany" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
     
<huag:OAGridView  id="gv" runat="server" DataKeyNames="Id" AllowSorting="True" skinid="PagingGridView" Width="98%" ConfirmDelete="true"  DataSourceID="odsApproval" OnRowDataBound="gv_RowDataBound" EnableViewState="false" >
   <Columns>
       <%--<asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name"  />DataFormatString="{0:yyyy-MM-dd}"--%>
       <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="ApplicationView.aspx?id={0}" DataNavigateUrlFields="ApplicationId" HeaderText="名称" target="_blank" SortExpression="Name"/>
       <asp:BoundField DataField="ApplicationCode" HeaderText="编号" />
       <asp:BoundField DataField="Applicant" HeaderText="申请人" SortExpression="Applicant" />
       <asp:BoundField DataField="DateOfApplication" HeaderText="申请日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="false" SortExpression="DateOfApplication" />
       <asp:BoundField DataField="ApprovedBy" HeaderText="审批者"  />
       <asp:BoundField DataField="DateApproved" HeaderText="审批日期"  HtmlEncode="false" />
       <asp:BoundField DataField="WarningDate" HeaderText="应审日期"  HtmlEncode="false" />
       <asp:BoundField DataField="ResultApproved" HeaderText="审批结果"  />
       <asp:BoundField DataField="ElapsedTime" HeaderText="审批时长" />
   </Columns>
</huag:OAGridView>

</ContentTemplate>
<Triggers>
<%--<asp:AsyncPostBackTrigger ControlID="btnQuery" />--%>
</Triggers>
</asp:UpdatePanel>


<asp:ObjectDataSource id="odsApproval" runat="server" EnablePaging="True" 
 TypeName="CentralOffice.Task.BusinessActions.Approvals" 
 SelectMethod="GetPaged" SelectCountMethod="GetCount"
 SortParameterName="sortExpression" OnSelecting="odsApproval_Selecting">
    <SelectParameters>      
      <asp:Parameter Name="whereClause" Type="String" />
      <%--<asp:Parameter Name="hideDeleted" Type="Boolean" DefaultValue="True" />
      <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="True" />--%>
    </SelectParameters>
</asp:ObjectDataSource>
</div>

<asp:updateprogress id="updateProgress"  runat="server">
    <progresstemplate>
        <div id="progressBackgroundFilter"></div>
        <div id="processMessage">正在处理数据，请稍等...<br /><br /><img alt="Loading" src="../images/loading_16.gif" /></div>
    </progresstemplate>
</asp:updateprogress>

    </form>
    <script type="text/javascript" src="../inc/js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
